package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhRegionUserMapper;
import com.ruoyi.xh.domain.XhRegionUser;
import com.ruoyi.xh.service.IXhRegionUserService;

/**
 * 账号信息Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhRegionUserServiceImpl extends ServiceImpl<XhRegionUserMapper,XhRegionUser> implements IXhRegionUserService {

    /**
     * 查询账号信息
     * 
     * @param id 账号信息主键
     * @return 账号信息
     */
    @Override
    public XhRegionUser selectXhRegionUserById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询账号信息列表
     * 
     * @param xhRegionUser 账号信息
     * @return 账号信息
     */
    @Override
    public Page<XhRegionUser> selectXhRegionUserList(XhRegionUser xhRegionUser)
    {
        return new Page<>();
    }

    /**
     * 新增账号信息
     * 
     * @param xhRegionUser 账号信息
     *
     */
    @Override
    public void insertXhRegionUser(XhRegionUser xhRegionUser)
    {
        this.save(xhRegionUser);
    }

    /**
     * 修改账号信息
     * 
     * @param xhRegionUser 账号信息
     *
     */
    @Override
    public void updateXhRegionUser(XhRegionUser xhRegionUser)
    {
        this.updateById(xhRegionUser);
    }

    /**
     * 批量删除账号信息
     * 
     * @param ids 需要删除的账号信息主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhRegionUserByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
